// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import { suduItemType } from "../../../../script/game/gameType";
import { ListItem } from "../../../../script/util/ListView/ListItem";

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends ListItem<suduItemType> {
    

    @property(cc.Label)
    answer: cc.Label = null;

    @property(cc.Node)
    high: cc.Node = null;

    @property(cc.Node) 
    origin: cc.Node = null;
    initItem(data: suduItemType, index: number) {
        if(data) {
            this.answer.string = data + "";
        } else {
            this.answer.string = "";
        }
    }
    onItemclick(data: suduItemType) {
        
    }
    setHigh() {
        this.high.active = true;
    }
    unHigh() {
        this.high.active = false;
    }
    setOrigin() {
        this.origin.active = true;
    }
    start () {

    }

    // update (dt) {}
}
